package com.example.ssm1023.exception;

import com.example.ssm1023.config.AppResult;

/**
 * 自定义异常
 */
public class ApplicationException extends RuntimeException {

    // 在异常中持有一个错误对象
    protected AppResult errorResult;

    public ApplicationException(AppResult appResult) {
        super(appResult.getMsg());
        this.errorResult = appResult;
    }

    public AppResult getErrorResult() {
        return errorResult;
    }

}
